


//获取应用实例
const app = getApp()

Page({
  data: {
    winHeight: wx.getSystemInfoSync().windowHeight,
    itemList: [
      {
        "id":0,
        "hide":true,
        "title":"租客网文字口令怎么玩？",
        "desc":"你只要说对租客网发的你只要说对租客网发的你只要说对租客网发的你只要说对租客网发的你只要说对租客网发的"
      },
      {
        "id": 1,
        "hide": true,
        "title": "租客网文字口令怎么玩？",
        "desc": "你只要说对租客网发的"
      },
      {
        "id": 2,
        "hide": true,
        "title": "租客网文字口令怎么玩？",
        "desc": "你只要说对租客网发的"
      }
    ]
  },
  onLoad: function () {




  },
  //显示点击的item
  showItem: function(res){
    var that = this;
    var id = res.currentTarget.dataset.id;
    for (var i = 0; i < that.data.itemList.length;i++){
      if(id != i){
        that.data.itemList[i].hide = true;
      }else{
        that.data.itemList[id].hide = !that.data.itemList[id].hide;
      }
    }
    
    that.setData({
      itemList: that.data.itemList
    });
  }

})
